//
//  TabbarButtonIteam+Extension.swift
//  陌路微博
//
//  Created by 张继强 on 16/12/5.
//  Copyright © 2016年 张继强. All rights reserved.
//

import UIKit
extension UIBarButtonItem{
    convenience init(title:String,fontSize:CGFloat,target:AnyObject,action:Selector,isBack:Bool) {
        let rtBt:UIButton = UIButton.cz_textButton(title, fontSize: 16, normalColor: UIColor.darkGray, highlightedColor: .orange)
        if isBack {
            rtBt.setImage(UIImage.init(named: "navigationbar_back_withtext"), for: .normal)
            rtBt.setImage(UIImage.init(named: "navigationbar_back_withtext_highlighted"), for: .highlighted)
        }
        rtBt.addTarget(target, action: action, for: .touchUpInside)
        rtBt.sizeToFit()
        self.init(customView: rtBt)
    }
}
